#include "e2d/yml/trans/Serializer.h"

using Serializer = e2d::BasicSerializer;

template<>
void Serializer::Encode<e2d::TransformNode>(YAML::Node& node, const e2d::TransformNode& inst)
{
	Encode<e2d::Object>(node, inst);
	SetVariable<fxcc::graph::common::Transform>(node, "local", inst.m_Local);
	SetVariable<fxcc::graph::common::Transform>(node, "world", inst.m_World);

}


template<>
bool Serializer::Decode<e2d::TransformNode>(const YAML::Node& node, e2d::TransformNode& inst)
{
	Decode<e2d::Object>(node, inst);
	GetVariable<fxcc::graph::common::Transform>(node, "local", inst.m_Local);
	GetVariable<fxcc::graph::common::Transform>(node, "world", inst.m_World);

	return true;
}
